home *** CD-ROM | disk | FTP | other *** search
- /* $Id: I3DEXPRM.H 1.11 1997/06/20 20:55:16 john Exp $ */
- /*****************************************************************************\
- * *
- * I3DExPrm.h *
- * I3DExGeometricPrimitive definition *
- * *
- * Copyright (c) 1995, Ray Dream, Inc. All rights reserved. *
- * *
- \*****************************************************************************/
-
- #ifndef __I3DEXPRM__
- #define __I3DEXPRM__
-
- #ifndef __I3DEX__
- #include "I3DEx.h"
- #endif
-
-
- //****** Globally Unique Ids **************************************************
-
- DEFINE_GUID(IID_I3DExGeometricPrimitive, 0xAB40E1C0L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
- DEFINE_GUID(IID_IVolumePrimitive, 0xAB40E1C1L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
- DEFINE_GUID(IID_IRaytracablePrimitive, 0x93ee97d0, 0xc8cb, 0x11d0, 0x85, 0x4e, 0x0, 0xa0, 0xc9, 0xc, 0x1b, 0xf1);
-
-
- /*****************************************************************************\
- * I3DExGeometricPrimitive *
- * *
- * I3DExGeometricPrimitive is used to define external geometric objects. *
- * It can implement very few calls to start working, or may implement more *
- * to provide better integration with other renderers (like being able *
- * to do the ray-tracing calculations directly). *
- * *
- \*****************************************************************************/
-
-
- DECLARE_INTERFACE_(I3DExGeometricPrimitive, IUnknown) {
- //-- Geometry calls
- STDMETHOD(GetBBox) (BOX3D* bbox) PURE; // Optional - Return E_NOTIMPL if not implemented
- STDMETHOD(EnumPatches) ( EnumPatchesCallback callback, void* privData) PURE;
- STDMETHOD(EnumFacets) ( EnumFacetsCallback callback, void* privData, NUM3D fidelity) PURE;
- STDMETHOD(GetNbrLOD) (short &nbrLod) PURE;
- STDMETHOD(GetLOD) (short lodIndex,NUM3D &lod) PURE;
- STDMETHOD(MakeFacetMesh) (short index,FacetMesh &amesh) PURE;
- STDMETHOD(MakeFacetMesh) (NUM3D lod,FacetMesh &amesh) PURE;
- //-- Shading calls
- STDMETHOD_(ULONG, GetUVSpaceCount) () PURE;
- STDMETHOD(GetUVSpace) (ULONG uvSpaceID, UVSpaceInfo* uvSpaceInfo) PURE;
- STDMETHOD(UV2XYZ) (VECTOR2D* uv, ULONG uvSpaceID, VECTOR3D* resultPosition, BOOLEAN* inUVSpace) PURE; // Optional - Return E_NOTIMPL if not implemented
- };
-
- DECLARE_INTERFACE_(IRaytracablePrimitive, IUnknown) {
- STDMETHOD(RayHit) (BOOLEAN* didHit, Ray3D* ray, RayHitParameters* hitParams, RayHit3D* hit) PURE; // Optional - Return E_NOTIMPL if not implemented
- STDMETHOD(GetRayHitDetails) (RayHit3D* hit) PURE; // Optional - Return E_NOTIMPL if not implemented
- STDMETHOD(RayAllHits) (Ray3D* aR, NUM3D tmin, NUM3D tmax, RayHit3D* hit, RayHitCallback callback, void* privData) PURE; // Optional - Return E_NOTIMPL if not implemented
- STDMETHOD(IsInfiniteBB) (BOOLEAN &isInfinite) PURE;
- };
-
- DECLARE_INTERFACE_(IVolumePrimitive, IUnknown) {
- STDMETHOD(GetVolumeDensity) (const VECTOR3D &point,COLOR3D &filter,COLOR3D &glow) PURE;
- STDMETHOD(GetVolumeAttenuation) (const VECTOR3D &from,const VECTOR3D &to,COLOR3D &attenuation) PURE;
- STDMETHOD(SetDeformedBoundingBox) (const VECTOR3D &min,const VECTOR3D &max) PURE;
- };
-
- #endif
-
-